package com.ib.review.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ib.review.pojo.dto.KnowledgeParam;
import com.ib.review.pojo.po.KnowledgeBasePO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface KnowledgeBaseMapper extends BaseMapper<KnowledgeBasePO> {
    @Update("update td_knowledge_base set del_flag = 1 where knowledge_id = #{knowledgeId}")
    void updateDelFlag(String knowledgeId);

    void edit(KnowledgeBasePO knowledgeBasePO);

    void insertBatch(List<KnowledgeBasePO> list);

    Integer queryCount(KnowledgeParam knowledgeParam);

    KnowledgeBasePO queryByName(KnowledgeParam knowledgeParam);
}
